<?php

declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

use App\Middleware\ChatTokenMiddleware;
use Hyperf\HttpServer\Router\Router;


/**
 * =======微信聊天相关接口=========================================================
 */
Router::addGroup('/api/v1', function () {

    Router::addGroup('/user', function () {
        Router::post('/getWorkerInfo', [\App\Controller\api\v1\UserController::class, 'getWorkerInfo'],['middleware' => [ChatTokenMiddleware::class]]);  /*获取客服相关运营号列表*/
        Router::post('/getContactsList', [\App\Controller\api\v1\UserController::class, 'getContactsList'],['middleware' => [ChatTokenMiddleware::class]]);  /*获取运营号联系人列表*/
        Router::post('/getGroupList', [\App\Controller\api\v1\UserController::class, 'getGroupList']);  /*获取运营号下群列表*/
        Router::post('/remark', [\App\Controller\api\v1\UserController::class, 'remark'],['middleware' => [ChatTokenMiddleware::class]]);  /*设置好友备注*/

        Router::post('/getFriendsInfo', [\App\Controller\api\v1\FriendsController::class, 'getFriendsInfo'],['middleware' => [ChatTokenMiddleware::class]]);  /*获取好友个人资料*/

        Router::post('/getGroupMember', [\App\Controller\api\v1\GroupsController::class, 'getGroupMember']);  /*获取好友个人资料*/

        Router::post('/getCompanyList', [\App\Controller\api\v1\CompanyController::class, 'getList']);  /*查询运营号公司*/


    });

    Router::addGroup('/reply', function () {
        Router::post('/select-list', [\App\Controller\api\v1\ReplyController::class, 'selectList']);  /*获取快捷回复数据*/
        Router::post('/add', [\App\Controller\api\v1\ReplyController::class, 'add']);  /*新增快捷回复数据*/
        Router::post('/update', [\App\Controller\api\v1\ReplyController::class, 'update']);  /*修改快捷回复数据*/
        Router::get('/delete', [\App\Controller\api\v1\ReplyController::class, 'delete']);  /*删除快捷回复数据*/
    });


});
Router::addGroup('/gateway/api', function () {
    /**上传聊天图片*/
    Router::post('/upload', [\App\Controller\common\UploadController::class, 'upload']);  /*上传聊天图片*/
});